<!-- 策划工作安排 - 查看的 操作按钮 -->
<template>
  <div>
    <!-- 待提交 待签收 -->
    <span v-if="item.status == 1 || item.status == 0"> -- </span>
    <template v-else>
      <a @click="lookHandler(item)">查看</a>
      <!-- 待提交 -->
      <span @click="$bus.$emit('showApprovalDetailsDialog', item.id)">
        <a-divider type="vertical" />
        <a> 审批信息</a>
      </span>
    </template>
  </div>
</template>

<script>
import { pageName } from '../../../projectManagementPlanningComponents/components/model.js'
export default {
  name: 'Opera',
  props: {
    item: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {}
  },

  components: {},

  computed: {},

  created() {},

  mounted() {},

  methods: {
    lookHandler(item) {
      const { id, code } = item
      console.log(code - 1 === 0, this.pagekey)
      if (code - 1 === 0) {
      this.$listeners.prevHandler()
      } else {
        this.$router.push({
          path: '/project/projectManagementPlanning/projectManagementPlanningComponents',
          query: {
            id,
            pageType: 'detail',
            editModel: 0,
            pageName: pageName[code - 1]
          }
        })
      }
    }
  }
}
</script>
<style lang='less' scoped>
</style>